<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="sf" uri="http://www.springframework.org/tags/form" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="<%=request.getContextPath() %>/resources/css/admin/basic.css" type="text/css"/>
<link rel="stylesheet" href="<%=request.getContextPath() %>/resources/css/admin/index.css" type="text/css"/>
<link rel="stylesheet" href="<%=request.getContextPath() %>/resources/css/admin/table1.css" type="text/css"/>
<link rel="stylesheet" href="<%=request.getContextPath() %>/resources/css/icon.css" type="text/css"/>
<script type="text/javascript" src="<%=request.getContextPath()%>/resources/js/jquery-1.8.3.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/resources/js/main.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/resources/js/admin/jquery.admintable.js"></script>
    <script type="text/javascript" src="<%=request.getContextPath()%>/resources/js/public/jquery.confirmdialog.js"></script>
    <script type="text/javascript">
$(function(){
	$("#admintable").admintable();
    $("a[oper='delete']").confirmdialog();

});
function doExport(){

    document.getElementById("mainForm").submit();
}
function display(){
    document.getElementById("mainForm").action="<%=request.getContextPath() %>/admin/user/search"
    document.getElementById("mainForm").submit();
}
</script>
</head>
<body>
<div class="main_content_container">
    <form method="post" id="mainForm">
	<table id="admintable" cellpadding="0" cellspacing="0">
        <thead>
        <tr>
            <td  colspan="6" class="title">
                <ul class="function_menu">
                    <li id="select"> <input name="name" size="30"/> </li>
                    <li><a href="#" onclick="display()"><span class="icon16 icon-search"></span>查询</a></li>
                    <li><a href="#" onclick="doExport()" oper="delete" ><span class="icon16 icon-cancel"></span>删除</a></li>
                </ul>
            </td>
        </tr>
        <tr showCheck="1">
            <td objId="1" width="5%" align="center"><strong>编号</strong></td>
            <td width="6%" align="center"><strong>用户名称</strong></td>
            <td width="68%" align="center"><strong>用户邮箱</strong></td>
            <td width="10%" align="center"><strong>用户状态</strong></td>
            <td width="8%" align="center"><strong>用户操作</strong></td>
        </tr>
        </thead>

	<tbody>


    <c:forEach items="${userList.datas }" var="user">
        <tr>
            <td objId="${user.id}" align="center">${user.id}</td>
            <td align="center"><a href="${user.id }" class="list_link">${user.username }</a></td>
            <td align="center">
                <a href="mailto:${user.email }" class="list_link">${user.email }</a>
                &nbsp;
            </td>
            <td  class="jianju10">
                <c:if test="${user.status eq 0 }">
                    <span class="emp">停用</span>
                    <a href="user/updateStatus/${user.id }" class="list_op">启用</a>
                </c:if>
                <c:if test="${user.status eq 1 }">
                    <span>启用</span>
                    <a href="user/updateStatus/${user.id }" class="list_op">停用</a>
                </c:if>
                &nbsp;
            </td>
            <td align="center">
                <a href="user/delete/${user.id }" title="${user.id }" class="name"  oper="delete">删除</a>
                &nbsp;
            </td>

        </tr>
    </c:forEach>


	  	</tbody>

	  	<tfoot>
	  	<tr>
		    <td colspan="6">
                <jsp:include page="/jsp/public/pager.jsp">
                    <jsp:param value="${userList.total }" name="totalRecord"/>
                    <jsp:param value="userList" name="url"/>
                </jsp:include>
		    </td>
	    </tr>
	    </tfoot>

	</table>
    </form>
   </div>
</div>
</body>
</html>